package org.theSeed.service;

import org.springframework.web.multipart.MultipartFile;
import org.theSeed.fileContract.pojo.vo.*;
import org.theSeed.pojo.ro.*;

import javax.servlet.http.HttpServletResponse;

public interface FileService {
    /**
     * 文件上传
     * @param file
     * @return
     */
    SeedUploadFileProxyVo uploadFile(MultipartFile file);

    /**
     * 文件更新
     * @param updateFileRo
     * @return
     */
    SeedUploadFileProxyVo updateFile(UpdateFileRo updateFileRo);

    /**
     * 文件删除
     * @param resourceBo
     * @return
     */
    SeedUploadFileProxyVo deleteFile(ResourceBo resourceBo);

    /**
     * 分片上传初始化
     * @param uploadChipFileInitRo
     * @return
     */
    SeedUploadChipFileInitProxyVo initUploadChipFile(UploadChipFileInitRo uploadChipFileInitRo);

    /**
     * 分片上传
     * @param uploadChipFileRo
     * @return
     */
    SeedUploadFileProxyVo uploadChipFile(UploadChipFileRo uploadChipFileRo);

    /**
     * 文件合并
     * @param mergeChipFileRo
     * @return
     */
    SeedUploadFileProxyVo mergeChipFile(MergeChipFileRo mergeChipFileRo);

    /**
     * 分片上传校验
     * @param checkChipFileRo
     * @return
     */
    SeedCheckChipFileProxyVo checkChipFile(CheckChipFileRo checkChipFileRo);

    /**
     * 取消分片上传
     * @param cancleChipFileRo
     * @return
     */
    CancleChipFileProxyVo cancleChipFile(CancleChipFileRo cancleChipFileRo);

    void getFile(String resourceUrl, HttpServletResponse resp);
}
